package com.lzh.prometheus.properties.enums;

import java.util.Arrays;

/**
 * @author zhehen.lu
 * @date 2025/8/15 9:59
 */
public enum DingdingTextTypeEnum {

    TEXT("text"), MARKDOWN("markdown");

    private final String msgType;

    public String getMsgType() {
        return msgType;
    }

    private DingdingTextTypeEnum(String msgType) {
        this.msgType = msgType;
    }

    public static DingdingTextTypeEnum getEnumByValue(String value) {
        return Arrays.stream(values()).filter(v -> v.getMsgType().equals(value)).findFirst().orElse(null);
    }

}
